//
//  AppDelegate.h
//  FMS
//
//  Created by Steven on 10/10/13.
//  Copyright (c) 2013 QGSVN. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "LoginViewController.h"
#import "MenuHomeViewController.h"

#define ApplicationDelegate ((AppDelegate *)[[UIApplication sharedApplication] delegate])

@interface NSData(AES)
- (NSString *)hexadecimalString;
+ (NSData *)dataFromHexString:(NSString *)string;
@end

@interface AppDelegate : UIResponder <UIApplicationDelegate,UITabBarControllerDelegate,UIAlertViewDelegate> {
    NSArray *arrayLanguage; //store the Language data
    NSMutableDictionary *dictLanguage;
    LoginViewController *loginVC;
    UIActivityIndicatorView *myIndicatorView;
}

@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) UITabBarController *tabBarController;
@property (strong, nonatomic) UINavigationController *navigationController;
@property (strong, nonatomic) MenuHomeViewController *menuController;
@property (strong, nonatomic) NSArray *arrayLanguage;
@property (strong, nonatomic) UILabel *lblYourAccount;
@property (strong, nonatomic) UIActivityIndicatorView *myIndicatorView;

+ (void) getCompanyId:(NSString*)virtualHost;
+ (NSString *)decryptInfo:(NSString *)infoStr error:(NSError *)error;
+ (NSString *)encryptInfo:(NSString *)infoStr error:(NSError *)error;
+ (UIImage *) imageFromColor:(UIColor *)color;

- (void) loginSuccess;

- (NSString*) getMaintenanceName:(int)_maintenanceType;
- (NSString*) getMaintenanceStatus:(int)_statusId;
- (NSString*) getMaintenanceTypeName:(int)_maintenanceType;
- (NSInteger)getNumberDateTypeRequirement:(int)typeRequiremnt;

- (void)checkTimeDurationDB;

- (void) setProgressBar:(float)value;
- (void) setProgressBarHidden:(BOOL)hide;

@end
